package com.bf.electroplating.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 企业排污阀告警记录表
 *
 * @author system
 * @since 2025-10-09
 */
@Getter
@Setter
@TableName("enterprise_outfall_valve_alarm")
@Schema(description = "企业排污阀告警记录表")
public class EnterpriseOutfallValveAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId("ID")
    private String id;

    @Schema(description = "阀门ID")
    @TableField("VALVE_ID")
    private String valveId;

    @Schema(description = "阀门名称")
    @TableField("VALVE_NAME")
    private String valveName;

    @Schema(description = "企业ID")
    @TableField("COMPANY_ID")
    private String companyId;

    @Schema(description = "企业名称")
    @TableField("COMPANY_NAME")
    private String companyName;

    @Schema(description = "MN码")
    @TableField("MN_CODE")
    private String mnCode;

    // ==================== 告警信息 ====================
    @Schema(description = "告警类型：FLOW_EXCEED-流量超标,PH_ABNORMAL-PH异常,COD_EXCEED-COD超标,DEVICE_FAULT-设备故障,OFFLINE-设备离线")
    @TableField("ALARM_TYPE")
    private String alarmType;

    @Schema(description = "告警级别：INFO-提示,WARNING-警告,ERROR-错误,CRITICAL-严重")
    @TableField("ALARM_LEVEL")
    private String alarmLevel;

    @Schema(description = "告警值")
    @TableField("ALARM_VALUE")
    private String alarmValue;

    @Schema(description = "阈值")
    @TableField("THRESHOLD_VALUE")
    private String thresholdValue;

    @Schema(description = "告警描述")
    @TableField("ALARM_DESC")
    private String alarmDesc;

    // ==================== 时间信息 ====================
    @Schema(description = "告警开始时间")
    @TableField("ALARM_START_TIME")
    private LocalDateTime alarmStartTime;

    @Schema(description = "告警结束时间")
    @TableField("ALARM_END_TIME")
    private LocalDateTime alarmEndTime;

    @Schema(description = "告警持续时间(分钟)")
    @TableField("ALARM_DURATION")
    private Integer alarmDuration;

    // ==================== 处理信息 ====================
    @Schema(description = "告警状态：UNHANDLED-未处理,HANDLING-处理中,HANDLED-已处理")
    @TableField("ALARM_STATUS")
    private String alarmStatus;

    @Schema(description = "处理人")
    @TableField("HANDLE_PERSON")
    private String handlePerson;

    @Schema(description = "处理时间")
    @TableField("HANDLE_TIME")
    private LocalDateTime handleTime;

    @Schema(description = "处理方法")
    @TableField("HANDLE_METHOD")
    private String handleMethod;

    @Schema(description = "处理结果")
    @TableField("HANDLE_RESULT")
    private String handleResult;

    // ==================== 系统字段 ====================
    @Schema(description = "创建时间")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("UPDATE_TIME")
    private LocalDateTime updateTime;
}

